package com.example.pcl.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * <p>
 * 健康知识评论表，记录用户对心理健康知识的评论
 * </p>
 *
 * @author xx
 * @since 2024-12-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("health_knowledge_comments")
@Schema(name = "HealthKnowledgeComments对象", description = "健康知识评论表，记录用户对心理健康知识的评论")
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class HealthKnowledgeComments implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "评论ID")
    @TableId(value = "comment_id", type = IdType.AUTO)
    private Integer commentId;

    @Schema(description = "知识ID")
    private Integer knowledgeId;

    @Schema(description = "评论用户ID")
    private Integer userId;

    @Schema(description = "评论内容")
    private String comment;

    @Schema(description = "评分 (1: 非常差, 2: 较差, 3: 一般, 4: 较好, 5: 非常好)")
    private Integer rating;

    @Schema(description = "评论时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;


    public static final Integer VERY_POOR = 1;
    public static final Integer POOR = 2;
    public static final Integer GENERAL = 3;
    public static final Integer BETTER = 4;
    public static final Integer VERY_GOOD = 5;

}
